home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 21 / CU Amiga Magazine's Super CD-ROM 21 (1998)(EMAP Images)(GB)[!][issue 1998-04].iso / CUCD / Utilities / KeyReq / Demo / Source / AutoRequester.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-12-16  |  821 b   |  38 lines

  1. program AutoRequester;
  2.  
  3. uses Exec,Intuition,Graphics;
  4.  
  5. const
  6.     bodytext    : string = 'Where do you want to be tomorrow?'#0;
  7.     postext        : string = 'Here'#0;
  8.     negtext        : string = 'No, There!'#0;
  9.     
  10. var
  11.     body,positive,negative    : tIntuiText;
  12.     b    : boolean;
  13.  
  14. begin
  15.     IntuitionBase:=pIntuitionBase(OpenLibrary('intuition.library',36));
  16.     if IntuitionBase<>NIL then
  17.     begin
  18.         body.FrontPen:=1;
  19.         body.BackPen:=0;
  20.         body.DrawMode:=JAM2;
  21.         body.LeftEdge:=2;
  22.         body.TopEdge:=2;
  23.         
  24.         positive:=body;
  25.         negative:=body;
  26.         
  27.         body.Itext:=@bodytext[1];
  28.         positive.IText:=@postext[1];
  29.         negative.IText:=@negtext[1];
  30.  
  31.         b:=AutoRequest(intuitionbase^.ActiveWindow,@body,@positive,@negative,0,0,300,100);
  32.         CloseLibrary(pLibrary(IntuitionBase));
  33.         
  34.         Write('You clicked on: ');
  35.         if b then Writeln('"Here"') else Writeln('"No, there!"');
  36.     end;
  37. end.
  38.